package net.xiduth.utils.item;

import java.io.IOException;
import java.util.ArrayList;

import net.xiduth.utils.FileUtilities;
import net.xiduth.utils.Misc;

/**
 * @author Tyluur <itstyluur@gmail.com>
 * @since 2012-08-17
 */
public class GrandExchangeUnbuyables {
	
	/** The arraylist of the unbuyable items. */
	private static final ArrayList<String> UNBUYABLES = new ArrayList<String>();
	
	/** 
	 * Populates the {@link GrandExchangeUnbuyables#UNBUYABLES} items arraylist.
	 */
	public static final void loadItems() {
		try {
			for (String lines : FileUtilities.readFile("./data/items/grand_exchange/unbuyables.txt")) {
				String[] data = lines.split(" ");
				UNBUYABLES.add(Misc.getCompleted(data, 0));
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static final ArrayList<String> getUnbuyables() {
		return UNBUYABLES;
	}

}
